package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author 张永远
 * @since 2020-05-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_role")
public class RoleDo extends Model<RoleDo> {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 角色名
     */
    @TableField("role_name")
    private String roleName;

    @TableField("tips")
    private String tips;

    /**
     * 编码（admin.....）
     */
    @TableField("dev_code")
    private String devCode;

    /**
     * 角色类型1：老项目角色 2客户角色3：后台角色
     */
    @TableField("role_type")
    private Integer roleType;

    @TableField(value = "company_id", fill = FieldFill.INSERT)
    private Long companyId;


    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    private Long tenantId;


    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private Long createBy;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    private Long updateBy;

    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableField("delete_by")
    private Long deleteBy;

    @TableField("delete_time")
    private Date deleteTime;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
